a=input()
b=input()
c=input()
if a==c[::-1] and b[0]==b[2]:
print("YES")
else:
print('NO')
#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main(int argc, char const *argv[])
{
char arr[3][3];
for (int i = 0; i <3; i++)
{
for (int j = 0; j <3; j++)
{
cin>>arr[i][j];
}
}
int flag=0;
for (int i = 0; i <3; i++)
{
for (int j = 0; j <3; j++)
{
if (arr[0][0]==arr[2][2]&&arr[0][1]==arr[2][1]&&arr[0][2]==arr[2][0]&&arr[1][0]==arr[1][2])
{
cout<<"YES";
flag=1;
break;
}
}
if(flag==1){
break;
}
}
if (flag==0)
{
cout<<"NO";
}
return 0;
}
1668A - Direction Change | 1667B - Optimal Partition |
1668B - Social Distance | 88B - Keyboard |
580B - Kefa and Company | 960A - Check the string |
1220A - Cards | 897A - Scarborough Fair |
1433B - Yet Another Bookshelf | 1283B - Candies Division |
1451B - Non-Substring Subsequence | 1408B - Arrays Sum |
1430A - Number of Apartments | 1475A - Odd Divisor |
1454B - Unique Bid Auction | 978C - Letters |
501B - Misha and Changing Handles | 1496A - Split it |
1666L - Labyrinth | 1294B - Collecting Packages |
1642B - Power Walking | 1424M - Ancient Language |
600C - Make Palindrome | 1669D - Colorful Stamp |
1669B - Triple | 1669A - Division |
1669H - Maximal AND | 1669E - 2-Letter Strings |
483A - Counterexample | 3C - Tic-tac-toe |